const express = require('express');
const UserController = require('../controller/UserController');
const UserModel = require('../model/UserModel')

let apiRouter = express.Router();

apiRouter.get('/', (req, res) => {
    res.render('home');
})

apiRouter.get('/control',(req,res)=>{
    res.render('control');
});

apiRouter.get('/findAll',UserController.findAll);

apiRouter.post('/register',UserController.addUser);

apiRouter.post('/login',UserController.findOne);

module.exports = apiRouter;